package br.com.werp.suporte.Hardware;
import java.util.*;
import org.apache.struts.action.*;
import javax.servlet.http.*;

/**
 * Creation Date 03/09/2004 10:27:02
 * Last Modify Date 21/12/2005 13:29:17
 */

public class DetalheHdActionForm extends org.apache.struts.action.ActionForm {
  public String hadk_id;
  public String hadk_marca;
  public String hadk_modelo;
  public String hadk_rpm;
  public String hadk_tpcabeamento;
  public String hadk_fonteenergia;
  public String hadk_txtransferencia;
  private boolean valida = false;
  public DetalheHdActionForm() {
  }
  /**
    * HADK_ID: Gets the value of this field.
    */
  public String getHadk_id() {
    return hadk_id;
  }
  /**
     * HADK_ID: Sets thhe value for this field.
     */
  public void setHadk_id(String HADK_ID) {
    hadk_id = HADK_ID;
  }
  /**
    * HADK_MARCA: Gets the value of this field.
    */
  public String getHadk_marca() {
    return hadk_marca;
  }
  /**
     * HADK_MARCA: Sets thhe value for this field.
     */
  public void setHadk_marca(String HADK_MARCA) {
    hadk_marca = HADK_MARCA;
  }
  /**
    * HADK_MODELO: Gets the value of this field.
    */
  public String getHadk_modelo() {
    return hadk_modelo;
  }
  /**
     * HADK_MODELO: Sets thhe value for this field.
     */
  public void setHadk_modelo(String HADK_MODELO) {
    hadk_modelo = HADK_MODELO;
  }
  /**
    * HADK_RPM: Gets the value of this field.
    */
  public String getHadk_rpm() {
    return hadk_rpm;
  }
  /**
     * HADK_RPM: Sets thhe value for this field.
     */
  public void setHadk_rpm(String HADK_RPM) {
    hadk_rpm = HADK_RPM;
  }
  /**
    * HADK_TPCABEAMENTO: Gets the value of this field.
    */
  public String getHadk_tpcabeamento() {
    return hadk_tpcabeamento;
  }
  /**
     * HADK_TPCABEAMENTO: Sets thhe value for this field.
     */
  public void setHadk_tpcabeamento(String HADK_TPCABEAMENTO) {
    hadk_tpcabeamento = HADK_TPCABEAMENTO;
  }
  /**
    * HADK_FONTEENERGIA: Gets the value of this field.
    */
  public String getHadk_fonteenergia() {
    return hadk_fonteenergia;
  }
  /**
     * HADK_FONTEENERGIA: Sets thhe value for this field.
     */
  public void setHadk_fonteenergia(String HADK_FONTEENERGIA) {
    hadk_fonteenergia = HADK_FONTEENERGIA;
  }
  /**
    * HADK_TXTRANSFERENCIA: Gets the value of this field.
    */
  public String getHadk_txtransferencia() {
    return hadk_txtransferencia;
  }
  /**
     * HADK_TXTRANSFERENCIA: Sets thhe value for this field.
     */
  public void setHadk_txtransferencia(String HADK_TXTRANSFERENCIA) {
    hadk_txtransferencia = HADK_TXTRANSFERENCIA;
  }
  /**
    * Reset all fields.
    */
  public void reset(org.apache.struts.action.ActionMapping mapping,
      javax.servlet.http.HttpServletRequest request) {
    hadk_id = null;
    hadk_marca = null;
    hadk_modelo = null;
    hadk_rpm = null;
    hadk_tpcabeamento = null;
    hadk_fonteenergia = null;
    hadk_txtransferencia = null;
  }
  /**
    * Validate fields and return ActionErrors.
    */

  public ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
      javax.servlet.http.HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    valida = false;
    if (!com.egen.util.struts.Token.isTokenValid(mapping, request)) {
      errors.add("Warning", new ActionError("token.error","<br>","","",""));
    }
    com.egen.util.struts.Token.saveToken(mapping, request);
    if (com.egen.util.text.Validate.isValidate("update_action,delete_action,",
        request)) {
      if (com.egen.util.text.Validate.isNull(hadk_id)) {
        errors.add("ActionErrors.GLOBAL_ERROR",
            new ActionError("error.validate.notnull","hadk_id","hadk_id",
                "0"));
      }
      if (com.egen.util.text.Validate.isNull(hadk_marca)) {
        errors.add("ActionErrors.GLOBAL_ERROR",
            new ActionError("error.validate.notnull","Marca","hadk_marca",
                "0"));
      }





    }
    if (errors != null && errors.size() > 0) {
      javax.servlet.http.HttpSession session = request.getSession(true);
      ActionForward actionForward = null;
      session.setAttribute(mapping.getName(), this);
    }
    return errors;
  }
}
